home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 1.iso / dist / fw_qt.idb / usr / freeware / include / qwindowdefs.h.z / qwindowdefs.h
C/C++ Source or Header  |  2001-04-12  |  4KB  |  175 lines

  1. /****************************************************************************
  2. ** $Id: qt/src/kernel/qwindowdefs.h   2.3.0   edited 2001-02-17 $
  3. **
  4. ** Definition of general window system dependent functions, types and
  5. ** constants
  6. **
  7. ** Created : 931029
  8. **
  9. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  10. **
  11. ** This file is part of the kernel module of the Qt GUI Toolkit.
  12. **
  13. ** This file may be distributed under the terms of the Q Public License
  14. ** as defined by Trolltech AS of Norway and appearing in the file
  15. ** LICENSE.QPL included in the packaging of this file.
  16. **
  17. ** This file may be distributed and/or modified under the terms of the
  18. ** GNU General Public License version 2 as published by the Free Software
  19. ** Foundation and appearing in the file LICENSE.GPL included in the
  20. ** packaging of this file.
  21. **
  22. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  23. ** licenses may use this file in accordance with the Qt Commercial License
  24. ** Agreement provided with the Software.
  25. **
  26. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  27. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  28. **
  29. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  30. **   information about Qt Commercial License Agreements.
  31. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  32. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  33. **
  34. ** Contact info@trolltech.com if any conditions of this licensing are
  35. ** not clear to you.
  36. **
  37. **********************************************************************/
  38.  
  39. #ifndef QWINDOWDEFS_H
  40. #define QWINDOWDEFS_H
  41.  
  42. #ifndef QT_H
  43. #include "qobjectdefs.h"
  44. #include "qstring.h"
  45. #include "qnamespace.h"
  46. #endif // QT_H
  47.  
  48. #include <limits.h>
  49.  
  50. // Class forward definitions
  51.  
  52. class QPaintDevice;
  53. class QPaintDeviceMetrics;
  54. class QWidget;
  55. class QWidgetMapper;
  56. class QDialog;
  57. class QColor;
  58. class QColorGroup;
  59. class QPalette;
  60. class QCursor;
  61. class QPoint;
  62. class QSize;
  63. class QRect;
  64. class QPointArray;
  65. class QPainter;
  66. class QRegion;
  67. class QFont;
  68. class QFontMetrics;
  69. class QFontInfo;
  70. class QPen;
  71. class QBrush;
  72. class QWMatrix;
  73. class QPixmap;
  74. class QBitmap;
  75. class QMovie;
  76. class QImage;
  77. class QImageIO;
  78. class QPicture;
  79. class QPrinter;
  80. class QAccel;
  81. class QTimer;
  82. class QTime;
  83. class QClipboard;
  84.  
  85.  
  86. // Widget list (defined in qwidgetlist.h)
  87.  
  88. class QWidgetList;
  89. class QWidgetListIt;
  90.  
  91.  
  92. // Window system dependent definitions
  93.  
  94. #if defined(_WS_MAC_)
  95.  
  96. typedef void * HANDLE;
  97. typedef int WId;
  98. typedef void * MSG;
  99.  
  100. #endif
  101.  
  102.  
  103. #if defined(_WS_WIN_)
  104. #include "qwindowdefs_win.h"
  105. #endif // _WS_WIN_
  106.  
  107.  
  108. #if defined(_WS_X11_)
  109.  
  110. #if QT_VERSION > 290
  111. #error "define WId and friends to ulong always"
  112. #endif
  113.  
  114. #if defined(UINT_MAX) && defined(ULONG_MAX) && (ULONG_MAX > UINT_MAX)
  115. typedef unsigned long  WId;
  116. typedef unsigned long  HANDLE;
  117. #else
  118. typedef unsigned int  WId;
  119. typedef unsigned int  HANDLE;
  120. #endif
  121.  
  122. typedef struct _XDisplay Display;
  123. typedef union  _XEvent XEvent;
  124. typedef struct _XGC *GC;
  125. typedef struct _XRegion *Region;
  126.  
  127. Q_EXPORT Display *qt_xdisplay();
  128. Q_EXPORT int     qt_xscreen();
  129. Q_EXPORT WId     qt_xrootwin();
  130. Q_EXPORT GC     qt_xget_readonly_gc( bool monochrome=FALSE );
  131. Q_EXPORT GC     qt_xget_temp_gc( bool monochrome=FALSE );
  132.  
  133. #endif // _WS_X11_
  134.  
  135. #if defined(_WS_QWS_)
  136.  
  137. struct QWSEvent;
  138. typedef unsigned int WId;
  139. typedef void* HANDLE;
  140. class QGfx;
  141.  
  142. #endif // _WS_QWS_
  143.  
  144. class QApplication;
  145.  
  146. #if defined(NEEDS_QMAIN)
  147. #define main qMain
  148. #endif
  149.  
  150. // Global platform-independent types and functions
  151.  
  152.  
  153. typedef Q_INT32 QCOORD;                // coordinate type
  154. const QCOORD QCOORD_MAX =  2147483647;
  155. const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;
  156.  
  157. typedef unsigned int QRgb;            // RGB triplet
  158.  
  159. Q_EXPORT char *qAppName();            // get application name
  160.  
  161.  
  162. // Misc functions
  163.  
  164. typedef void (*Q_CleanUpFunction)();
  165. Q_EXPORT void qAddPostRoutine( Q_CleanUpFunction );
  166. Q_EXPORT void qRemovePostRoutine( Q_CleanUpFunction );
  167.  
  168. // ### remove 3.0
  169. Q_EXPORT void *qt_find_obj_child( QObject *, const char *, const char * );
  170. #define Q_CHILD(parent,type,name) \
  171.     ((type*)qt_find_obj_child(parent,#type,name))
  172.  
  173.  
  174. #endif // QWINDOWDEFS_H
  175.